package question2;

/**
 * 编程实现矩形类
 *
 * @FileName SquareTest
 * @Description
 * @Author Sword
 * @date 2024-10-11
 **/
public class SquareTest {
    public static void main(String[] args) {

        Square square = new Square(10,20);

        int perimeter = square.getPerimeter(square.getLength(), square.getWidth());
        System.out.println("周长为:" + perimeter);

        int area = square.getArea(square.getLength(), square.getWidth());
        System.out.println("面积为:" + area);

    }
}


